package com.brayan.webapp.controller.general.i18n;

import javax.inject.Inject;
import javax.inject.Named;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.Consumes;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;

import com.brayan.webapp.service.general.i18n.LocaleBean;

@Named
@Path("/i18n/locale/")
@Consumes("*/*")
@Produces(MediaType.APPLICATION_JSON)
public class LocaleResource {
	
	@Inject
	LocaleBean localeService;
	
	@PUT
	@Path("{localeCode}")
	public void setTranslation(
			@PathParam("localeCode") String localeCode, 
			@Context HttpServletRequest request){		
		
		localeService.saveLocale(localeCode);			
	}	

}
